package com.shanzmoo.platform.tomember.api.web.product;


import com.shanzmoo.base.bean.PageRespBase;
import com.shanzmoo.base.bean.SHttpResponse;
import com.shanzmoo.db.module.product.domain.query.ProductQueryVO;
import com.shanzmoo.db.module.product.domain.query.ScoreQueryVO;
import com.shanzmoo.db.module.product.domain.vo.ProductScoreVO;
import com.shanzmoo.db.module.product.domain.vo.ProductVO;
import com.shanzmoo.db.module.product.domain.vo.ScoreDetailVO;
import com.shanzmoo.platform.tomember.api.manager.ProductCenterManager;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 商品spumanager
 * @author xueqz
 */
@Api(tags = "平台业务接口--商品服务")
@RestController
@RequestMapping("/product")
public class ProductCenterController {

    @Autowired
    private ProductCenterManager productCenterManager;

    @ApiOperation(value = "商品列表")
    @GetMapping("/getScoreSkuList")
    public SHttpResponse<List<ProductScoreVO>> getScoreSkuList(ScoreQueryVO scoreQueryVO) {//@Valid @RequestBody
        return productCenterManager.getScoreSkuList(scoreQueryVO);
    }

    @ApiOperation(value = "积分商品详情")
    @GetMapping("/getScoreInfo")
    public SHttpResponse<ScoreDetailVO> getScoreInfo(Integer id) {//@Valid @RequestBody
        return productCenterManager.getScoreInfo(id);
    }




}
